find_path(INOTIFYTOOLS_INCLUDE_DIR sys/inotify.h PATH_SUFFIXES inotify)
mark_as_advanced(INOTIFYTOOLS_INCLUDE_DIR)

find_library(INOTIFYTOOLS_LIBRARY inotifytools PATH_SUFFIXES lib/inotify)

get_filename_component(INOTIFYTOOLS_LIBRARY_DIR ${INOTIFYTOOLS_LIBRARY} PATH)
mark_as_advanced(INOTIFYTOOLS_LIBRARY_DIR)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(INOTIFYTOOLS DEFAULT_MSG INOTIFYTOOLS_INCLUDE_DIR INOTIFYTOOLS_LIBRARY_DIR)

IF(INOTIFYTOOLS_FOUND)
    SET(INOTIFYTOOLS_INCLUDE_DIRS ${INOTIFYTOOLS_INCLUDE_DIR})
    SET(INOTIFYTOOLS_LIBRARY_DIRS ${INOTIFYTOOLS_LIBRARY_DIR})
ENDIF(INOTIFYTOOLS_FOUND)
